package com.seed.core.action;

import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

public abstract class Action {
    protected String name; // 功能名称，自定义
    private String seedName; // 独立行为依赖的seed名称
    protected Boolean checkLogin; // 是否需要检查登录
    protected Boolean checkAction; // 是否需要检查功能权限

    public abstract Action copy();

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public abstract List<RequestMethod> getMethods();

    public String getSeedName() {
        return seedName;
    }

    public void setSeedName(String seedName) {
        this.seedName = seedName;
    }

    public Boolean getCheckLogin() {
        return checkLogin;
    }

    public void setCheckLogin(Boolean checkLogin) {
        this.checkLogin = checkLogin;
    }

    public Boolean getCheckAction() {
        return checkAction;
    }

    public void setCheckAction(Boolean checkAction) {
        this.checkAction = checkAction;
    }
}
